﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

using LoomDataEmulator.Data;

namespace LoomDataEmulator.Core
{
    public class FileProcessPool
    {
        private List<FileMetaData> _filesPool;

        public FileProcessPool()
        {
            if (_filesPool == null)
                _filesPool = new List<FileMetaData>();
        }

        public List<FileMetaData> FilesPool
        {
            get
            {
                return _filesPool;
            }
            set
            {
                _filesPool = value;
            }
        }

        public bool RemoveFile(FileMetaData fileInfo)
        {
            if(_filesPool != null && fileInfo != null)
            {
                return _filesPool.Remove(fileInfo);
            }

            return false;
        }

        public void AddFile(FileMetaData fileInfo)
        {
            if (_filesPool != null && fileInfo != null)
            {
                _filesPool.Add(fileInfo);
            }
        }

    }
}
